package com.ruoyi.project.pro.show.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.pro.classes.service.IClassesService;
import com.ruoyi.project.pro.line.service.ILineService;
import com.ruoyi.project.pro.show.domain.ProShow;
import com.ruoyi.project.pro.show.domain.ProShowVo;
import com.ruoyi.project.pro.show.service.IProShowService;
import com.ruoyi.project.pro.size.service.ISizeService;
import com.ruoyi.project.pro.style.service.IStyleService;
import com.ruoyi.project.pro.texture.service.ITextureService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @program: zhizun
 * @author: Mrs.ye
 * @create: 2020-09-17 16:33
 * @description: 产品管理的控制层
 **/
@Controller
@RequestMapping("/pro/show")
public class ProShowController extends BaseController {
    @Autowired
    private IProShowService proManagerService;



    private String prefix = "pro/show";

    /**
     * 跳转到产品管理的html页面
     * @return 添加的页面地址
     */
    @RequiresPermissions("pro:manager:view")
    @GetMapping()
    public String manager() {
        return prefix + "/show";
    }

    /**
     * 分页查询产品
     * @param proManager
     * @return
     */
    @RequiresPermissions("pro:manager:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(ProShow proManager) {
        startPage();
        List<ProShowVo> proManagerVos = proManagerService.selectManagerList(proManager);
        return getDataTable(proManagerVos);
    }






}
